﻿@model IEnumerable<CharacterCreation.Business.ViewModels.VMConstitution>
@{
    ViewBag.Title = "Index";
}

<p>
    @Html.ActionLink("Create New", "Create")
</p>

<div class="datatable">
<table>
    <tr>
        <th class="main-column">
            Level
        </th>
        <th>
            Beginning HP adjustment
        </th>
        <th>
            Healing rate
        </th>
        <th>
            Resistance to Poison
        </th>
        <th>
            Resistance to Disease
        </th>
        <th></th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td class="main-column">
            @Html.DisplayFor(modelItem => item.Level)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BeginningHitpointAdjustment)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.HealingRate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ResistanceToPoison)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ResistanceToDisease)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
            @Html.ActionLink("Details", "Details", new { id = item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.Id })
        </td>
    </tr>
}
</table>
</div>